package com.ruoyi.training.service.impl;

import java.util.List;

import com.ruoyi.training.domain.ExamQuestionOption;
import com.ruoyi.training.mapper.ExamQuestionOptionMapper;
import com.ruoyi.training.service.IExamQuestionOptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 课程题目选项管理Service业务层处理
 *
 * @author wng
 * @date 2024-08-04
 */
@Service
public class ExamQuestionOptionServiceImpl implements IExamQuestionOptionService {
    @Resource
    private ExamQuestionOptionMapper examQuestionOptionMapper;

    /**
     * 查询课程题目选项管理
     *
     * @param id 课程题目选项管理主键
     * @return 课程题目选项管理
     */
    @Override
    public ExamQuestionOption selectExamQuestionOptionById(Long id) {
        return examQuestionOptionMapper.selectExamQuestionOptionById(id);
    }

    /**
     * 查询课程题目选项管理列表
     *
     * @param examQuestionOption 课程题目选项管理
     * @return 课程题目选项管理
     */
    @Override
    public List<ExamQuestionOption> selectExamQuestionOptionList(ExamQuestionOption examQuestionOption) {
        return examQuestionOptionMapper.selectExamQuestionOptionList(examQuestionOption);
    }

    /**
     * 新增课程题目选项管理
     *
     * @param examQuestionOption 课程题目选项管理
     * @return 结果
     */
    @Override
    public int insertExamQuestionOption(ExamQuestionOption examQuestionOption) {
        return examQuestionOptionMapper.insertExamQuestionOption(examQuestionOption);
    }

    /**
     * 修改课程题目选项管理
     *
     * @param examQuestionOption 课程题目选项管理
     * @return 结果
     */
    @Override
    public int updateExamQuestionOption(ExamQuestionOption examQuestionOption) {
        return examQuestionOptionMapper.updateExamQuestionOption(examQuestionOption);
    }

    /**
     * 批量删除课程题目选项管理
     *
     * @param ids 需要删除的课程题目选项管理主键
     * @return 结果
     */
    @Override
    public int deleteExamQuestionOptionByIds(Long[] ids) {
        return examQuestionOptionMapper.deleteExamQuestionOptionByIds(ids);
    }

    /**
     * 删除课程题目选项管理信息
     *
     * @param id 课程题目选项管理主键
     * @return 结果
     */
    @Override
    public int deleteExamQuestionOptionById(Long id) {
        return examQuestionOptionMapper.deleteExamQuestionOptionById(id);
    }
}
